<p>This method compares double or float values using pattern like this: <code>val1 &gt; val2 ? 1 : val1 &lt; val2 ? -1 : 0</code>. This pattern works incorrectly for <code>-0.0</code> and <code>NaN</code> values which may result in incorrect sorting result or broken collection (if compared values are used as keys). Consider using <code>Double.compare</code> or <code>Float.compare</code> static methods which handle all the special cases correctly.</p>

<p>
This rule is deprecated, use {rule:squid:S1244} instead.
</p>
